<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>固定版心右侧</title>

    <style>
        .w {
            margin: 100px auto;
            width: 800px;
            height: 2500px;
            background-color: pink;
        }

        .left {
            position: fixed;
            top: 300px;
            left: 50%;
            margin-left: 405px;
            width: 50px;
            height: 100px;
            background-color: skyblue;
        }
    </style>

</head>
<body>
    
    <div class="w">
        版心盒子800像素
    </div>
    <div class="left"></div>

</body>
</html>